# # 千分位格式化
# str1 = input("输入数字：")
# a = []
# i = 0
# str2 = str1[::-1]
# while i < len(str2):
#     temp = str2[i:i + 3]
#     a.append(temp)
#     i = i + 3
# str3 = ",".join(a)
# print(str3[::-1])


str1 = input("输入数字：")
a =""
i = 0
str2 = str1[::-1]
while i < len(str2):
    temp = str2[i:i + 3]
    a=a+","+temp
    i = i + 3
b=a.strip(",")
print(b[::-1])